require('./index.scss');
var Tool = require('common/tool')
var template = require('./template.html');
var comp = avalon.component('ms-header', {
    template: template,
    defaults: {
        user:'',
        text:'',
        navShowArr:"",
        account:{
            withdrawOrderNum: 0,              //取款申请个数
            accountUpgradeOrderNum: 0,        //账户级别变更申请个数
            sumProposalNum: 0,                //存款取款账户级别总个数
            depositOrderNum: 0                //存款申请个数
        },
        languageText: _language==='zh' ? '繁体':'简体',
        languageSwitch:function(){
            var switchLanguage = _language==='zh' ? '_tw':'';
            docCookies.setItem('_language', switchLanguage.replace('_',''), Infinity,'/');
            location.href = `/index${switchLanguage}.html`;
        },
        logout(){
            Tool.logout();
        }
    }
});
module.exports = comp;